package com.ruoyi.model.service.impl;

import cn.hutool.core.util.IdUtil;
import com.ruoyi.model.domain.ModelTaskLayer;
import com.ruoyi.model.mapper.ModelTaskLayerMapper;
import com.ruoyi.model.service.IModelTaskLayerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModelTaskLayerServiceImpl implements IModelTaskLayerService {

    @Autowired
    private ModelTaskLayerMapper modelTaskLayerMapper;
    @Override
    public ModelTaskLayer selectModelTaskLayerById(Long id) {
        return modelTaskLayerMapper.selectModelTaskLayerById(id);
    }

    @Override
    public List<ModelTaskLayer> selectModelTaskLayerList(ModelTaskLayer modelTaskLayer) {
        return modelTaskLayerMapper.selectModelTaskLayerList(modelTaskLayer);
    }

    @Override
    public int insertModelTaskLayer(ModelTaskLayer modelTaskLayer) {
        modelTaskLayer.setId(IdUtil.getSnowflakeNextId());
        return modelTaskLayerMapper.insertModelTaskLayer(modelTaskLayer);
    }

    @Override
    public int updateModelTaskLayer(ModelTaskLayer modelTaskLayer) {
        return modelTaskLayerMapper.updateModelTaskLayer(modelTaskLayer);
    }

    @Override
    public int deleteModelTaskLayerByIds(Long id) {
        return modelTaskLayerMapper.deleteModelTaskLayerByIds(id);
    }

    @Override
    public int deleteModelTaskByIds(Long[] ids) {
        return modelTaskLayerMapper.deleteModelTaskByIds(ids);
    }
}
